package com.phiture.erp.stock.web.controller.api;

import com.phiture.erp.stock.api.pojo.req.ErpStockRecordCreateReq;
import com.phiture.erp.stock.api.service.ErpStockRecordApi;
import com.phiture.erp.stock.core.pojo.dto.ErpStockRecordCreateReqDTO;
import com.phiture.erp.stock.core.service.ErpStockRecordService;
import com.phiture.erp.stock.web.controller.convert.ErpStockRecordConvertMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author YH
 * @date 2025/4/14
 */

@Service
@RequiredArgsConstructor
public class ErpStockRecordApiServiceImpl implements ErpStockRecordApi {
    private final ErpStockRecordService stockRecordService;

    @Override
    public void createStockRecord(ErpStockRecordCreateReq req) {
        ErpStockRecordCreateReqDTO dto = ErpStockRecordConvertMapper.INSTANCE.toErpStockRecordCreateReqDTO(req);
        stockRecordService.createStockRecord(dto);
    }
}
